home *** CD-ROM | disk | FTP | other *** search
/ Freelog 115 / FreelogNo115-MaiJuin2013.iso / Internet / Filezilla Server / FileZilla_Server-0_9_41.exe / source / Thread.h < prev    next >
C/C++ Source or Header  |  2011-11-06  |  2KB  |  59 lines

  1. // FileZilla Server - a Windows ftp server
  2.  
  3. // Copyright (C) 2002-2004 - Tim Kosse <tim.kosse@gmx.de>
  4.  
  5. // This program is free software; you can redistribute it and/or
  6. // modify it under the terms of the GNU General Public License
  7. // as published by the Free Software Foundation; either version 2
  8. // of the License, or (at your option) any later version.
  9.  
  10. // This program is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. // GNU General Public License for more details.
  14.  
  15. // You should have received a copy of the GNU General Public License
  16. // along with this program; if not, write to the Free Software
  17. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  18.  
  19. // Thread.h: Schnittstelle fⁿr die Klasse CThread.
  20. //
  21. //////////////////////////////////////////////////////////////////////
  22.  
  23. #if !defined(AFX_THREAD_H__67621B15_8724_4B5D_9343_7667075C89F2__INCLUDED_)
  24. #define AFX_THREAD_H__67621B15_8724_4B5D_9343_7667075C89F2__INCLUDED_
  25.  
  26. #if _MSC_VER > 1000
  27. #pragma once
  28. #endif // _MSC_VER > 1000
  29.  
  30. class CThread
  31. {
  32. public:
  33.     CThread();
  34.  
  35. protected:
  36.     virtual ~CThread();
  37.     
  38.     // Operationen
  39. public:
  40.     DWORD m_dwThreadId;
  41.     HANDLE m_hThread;
  42.     BOOL Create(int nPriority = THREAD_PRIORITY_NORMAL, DWORD dwCreateFlags = 0);
  43.     DWORD SuspendThread();
  44.     DWORD ResumeThread();
  45.     BOOL PostThreadMessage( UINT message , WPARAM wParam, LPARAM lParam );
  46.     BOOL SetPriority(int nPriority);
  47.     
  48. protected:
  49.     virtual int OnThreadMessage(UINT Msg, WPARAM wParam, LPARAM lParam);
  50.     virtual BOOL InitInstance();
  51.     virtual DWORD ExitInstance();
  52.     DWORD Run();
  53.     static DWORD WINAPI ThreadProc(LPVOID lpParameter);
  54.     HANDLE m_hEventStarted;
  55.     bool m_started;
  56. };
  57.  
  58. #endif // !defined(AFX_THREAD_H__67621B15_8724_4B5D_9343_7667075C89F2__INCLUDED_)
  59.